package org.flowable.pz.entity.dto;

import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class FlowablePageDto<T> implements Serializable {
    private Integer pageIndex;//页码
    private Integer pageSize;//每页条数
    private Integer total;   //总条数
    private Integer pageNum; //总页数
    private List<T> list;    //数据列表

    public FlowablePageDto(int pageIndex, int pageSize, int total, List<T> list){
        this.pageIndex = pageIndex;
        this.pageSize = pageSize;
        this.total = total;
        this.pageNum = total%pageSize==0?total/pageSize:total/pageSize+1;
        this.list = list;
    }
}
